trigger trg_Tracking on Tracking__c (after insert)
{
    //For SLA Implementation.... (Record Creation)
    if(Trigger.isInsert && Trigger.isAfter )
    {
    
        List<SLA__c> slaList = new List<SLA__c>();
         
        // Assumes the BSC work hours are the default for the Org
        List<BusinessHours> businessHoursObjectList = new List<BusinessHours>([select id from businesshours where isDefault = true LIMIT 1]) ;
    
        if(businessHoursObjectList.size() > 0)
        {
            for(Tracking__c trackingObject : Trigger.New)
            {
                SLA__c slaObject = new SLA__c();
                slaObject.SLA_Hours__c = trackingObject.SLA_Hours__c ;
                slaObject.Actual_Start_Date_Time__c = DateTime.Now();
               
                // BSC works 11.5 hours / day (8:00 AM - 7:30 PM, M-F). Our SLA is 2-days (23 business hours)
                System.debug('The Actual Start Time => '+ slaObject.Actual_Start_Date_Time__c );
                System.debug('The Expected End Date => '+ slaObject.Actual_Start_Date_Time__c.addhours(integer.valueof(trackingObject.SLA_Hours__c )));
                System.debug('The Business Hour Date => ' + BusinessHours.add(businessHoursObjectList[0].id, slaObject.Actual_Start_Date_Time__c, integer.valueof(trackingObject.SLA_Hours__c) * 60 * 60 * 1000L));
                System.debug('The Business Hour Date GMT => ' + BusinessHours.addGmt(businessHoursObjectList[0].id, slaObject.Actual_Start_Date_Time__c, integer.valueof(trackingObject.SLA_Hours__c) * 60 * 60 * 1000L));
                slaObject.Expected_End_Date__c = BusinessHours.addGmt(businessHoursObjectList[0].id, slaObject.Actual_Start_Date_Time__c, integer.valueof(trackingObject.SLA_Hours__c) * 60 * 60 * 1000L);   // DateTime.Now().addhours(slaHours);
                
                slaObject.Tracking__c = trackingObject.Id ;
                slaObject.Process_Type__c = 'Tracking';
                slaObject.Application_Type__c = trackingObject.Transaction_Type_Name__c;
                //Adding in the List...
                slaList.add(slaObject);            
            
            
            }
            
            if(slaList.size() > 0)
                upsert slaList;
            
        }
    }
        
}